package edu.lingnan.springcloud.service;

import edu.lingnan.springcloud.entity.Classes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author wuyuan
 * @since 2020-06-09 16:07
 */
@Component // 注册到spring中
@FeignClient(value = "SPRINGCLOUD-PROVIDER-CLASSES", fallbackFactory = ClassesClientServiceFallbackFactory.class)
public interface ClassesClientService {
    @GetMapping("/classes/list")
    List<Classes> queryAll();

    @GetMapping("classes/get/{id}")
    Classes selectById(@PathVariable("id") int id);
}
